L.TrackLayer = function() {
  var aislayer = L.featureGroup([])
  aislayer.name = 'aisLayer'

  this.addTrack = function(marker) {
    marker.addTo(aislayer);
  };

  this.removeTrack = function(marker) {
    marker.removeFrom(aislayer);
  };


  this.addTo = function(map) {
    aislayer.addTo(map);
  };

  this.removeFrom = function(map) {
    aislayer.removeFrom(map)
  }

  this.clearLayers = function(map) {
    aislayer.clearLayers()
  }
};

L.trackLayer = function() {
  return new L.TrackLayer();
};
